home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / bmp2imc.zip / README < prev    next >
Text File  |  1994-02-20  |  3KB  |  79 lines

  1. This program is designed for putting some 'sophisticated' images in Turbo C.
  2.  
  3. It is very difficult to draw some images in Turbo C just using its own
  4. provided functions like bar(), and i think no one will use such functions
  5. to complete a game or an assignment.
  6.  
  7. So i develop the program BMP2IMC (IMC stands for IMage in C) to capture an
  8. area in BMP file and i also develop a function used by C named imc() to
  9. display such a IMC file in everywhere anytime you like.
  10.  
  11. But of course, since Turbo C EGA/VGA just support 16 colors, we can just
  12. display 16 colors BMP and then 16 colors IMC file. But i think it is enough
  13. to complete some simple games and graphics assignments.
  14. (Actually it is desinged for graphics assignments, since i want to draw some
  15. icons and develop my own beautiful windows!)
  16.  
  17. In my demo.c, i just use other program to capture some characters in BMP
  18. and then use Paintbrush to make some corrections to the BMP, then use the
  19. program BMP2IMC to convert the motion of the characters in IMC format and
  20. display them again. You're better to have a look of demo.c.
  21.  
  22. Since some IMC files maybe too large to display(>64k), if in
  23. this case, you must program in large model.
  24. The library for large model is also included.
  25.  
  26. Here are the lists and uses of the programs:
  27. BMP2IMC.EXE    -    capture a part in BMP and convert it in the format IMC.
  28. SHOWIMC.EXE    -    show the *.imc image
  29. IMCS.LIB       -    library file for small model
  30. IMCL.LIB       -    library file for large model
  31. DEMO.EXE       -    just a demo file for displaying the IMC files.
  32. DEMO.C         -    source code of DEMO.EXE
  33. *.IMC          -    IMC files. You can display them using SHOWIMC
  34.  
  35.  
  36. e.g. BMP2IMC sango.bmp
  37.      SHOWIMC panda.imc
  38.      tcc -ms demo.c imcs.lib  (dont forget to include lib while compiling)
  39.  
  40.  
  41.      To use the function imc(char*) provided in the library, you must fisrt
  42.      declare the extern function imc(), then a same pointer type of imc() :
  43.  
  44.      
  45. extern void far* imc(char*);
  46.  
  47. main()
  48. {    ..
  49.      ..
  50.      ..
  51.      void far* bitmap;
  52.      ..
  53.      ..
  54.  
  55.      ....
  56.      ....
  57.      bitmap=imc("panda.imc");
  58.      ....
  59.      ....
  60.      putimage(0,0,bitmap,COPY_PUT);
  61.      ....
  62.      ....
  63.      farfree(bitmap);
  64. }
  65.  
  66.      You're better to look the demo.c as an example.
  67.  
  68. P.S. If you have any comments and opinions, i'm very happy to receive your
  69.      messages in BBS (named Leung Tail) and any e-mail :
  70.      email     : kwleung2@se.cuhk.hk
  71.  
  72.      Since this is the first program i write to BBS, i'm very eagar to get
  73.      any opinions and share our experience in programming.
  74.  
  75.      Wait for your echo!
  76.  
  77. Leung Ka Wai
  78. 2/94
  79.